package teacher.action.student;

import com.opensymphony.xwork2.ActionSupport;
import teacher.bean.Stuaward;
import teacher.service.student;

public class addStuAwa extends ActionSupport{

	private static final long serialVersionUID = 1L;
	private Stuaward stuaward = new Stuaward();
	private int stuId2;
	String suc;
	
	public String getSuc() {
		return suc;
	}
	public void setSuc(String suc) {
		this.suc = suc;
	}
	public int getStuId2() {
		return stuId2;
	}
	public void setStuId2(int stuId2) {
		this.stuId2 = stuId2;
	}
	public Stuaward getStuaward() {
		return stuaward;
	}
	public void setStuaward(Stuaward stuaward) {
		this.stuaward = stuaward;
	}
	public String execute() throws Exception{
		stuaward.setStuId(stuId2);
		System.out.println(stuaward.getAwaname()+"cccc");
		
		if(new student().insertStuAwa(stuaward))
		{
			this.setSuc("success");
			return SUCCESS;
			}else{
				return ERROR;
			}
		
	}

}
